package com.ktwlsoft.archivemanage.payload.study.studyClass;

import lombok.Data;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.ArrayList;
import java.util.List;

@Data
public class StudyClassPayload {

    private Long id;

    @NotNull
    @Size(max = 20)
    private String title;

    @Size(max = 50)
    private String tag;

    @NotNull
    @Size(max = 200)
    private String mainImgUrl;

    /**
     * Database Column Remarks:
     *   状态, UP, WAIT, DOWN
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column study_class.state
     *
     * @mbg.generated
     */
    @NotNull
    private String state;

    private Long classifyId;

    private String classifyName;

    @NotNull
    private Boolean bannerShow;

    private String bannerImgUrl;

    private List<ClassGroupPayload> classGroupPayloads = new ArrayList<>();

    private String purpose = "ADD";

    public StudyClassPayload() {
    }

    public StudyClassPayload(@NotNull @Size(max = 20) String title, @Size(max = 50) String tag, @NotNull @Size(max = 200) String mainImgUrl, @NotNull String state, Long classifyId, @NotNull Boolean bannerShow, String bannerImgUrl) {
        this.title = title;
        this.tag = tag;
        this.mainImgUrl = mainImgUrl;
        this.state = state;
        this.classifyId = classifyId;
        this.bannerShow = bannerShow;
        this.bannerImgUrl = bannerImgUrl;
    }
}
